package com.mvp.shq.washer.entity;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2017/8/31.
 */

public class MessageBean {

    /**
     * id : ae5833d22c7c4c3f9b1e8641b7c5bb21
     * status : 0
     * messageId : 1d24833b6de647379dfbf0ef63c4f8bb
     * userId : 831d34a144554839b04ebe8221c71882
     * userMobile : 13655945593
     * title : test
     * content : test1
     * type : 0
     */

    private String id;
    private String status;
    private String messageId;
    private String userId;
    private String userMobile;
    private String title;
    private String content;
    private String type;
    private String createDate;

    public static MessageBean objectFromData(String str) {

        return new Gson().fromJson(str, MessageBean.class);
    }

    public static List<MessageBean> arrayMessageBeanFromData(String str) {

        Type listType = new TypeToken<ArrayList<MessageBean>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getMessageId() {
        return messageId;
    }

    public void setMessageId(String messageId) {
        this.messageId = messageId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserMobile() {
        return userMobile;
    }

    public void setUserMobile(String userMobile) {
        this.userMobile = userMobile;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getCreateDate() {
        return createDate;
    }

    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }
}
